<!--
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
-->
<template>
  <div class="table-tree__main">
    <el-table
      ref="modelTableRef"
      v-loading="loading"
      :data="props.treeVo"
      row-key="id"
      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
      :default-expand-all="isExpandAll"
       :height="tableHeight"
    >
      <el-table-column prop="fullFileName" align="left" label="文件名称"></el-table-column>
      <el-table-column prop="fileSizeWithUnit" label="文件大小" width="140"></el-table-column>
      <el-table-column prop="qualityCheck" label="质量检测状态" width="140">
        <template #default="scope">
          <span>{{ scope.row.qualityCheck == '0' ? '通过' : '未通过' }}</span>
        </template>
      </el-table-column>
      <el-table-column fixed="right" align="center" label="操作" width="120">
        <template #default="scope">
          <el-button v-if="scope.row.fileType == 'file'" disabled link type="primary" @click="viewStatus(scope.row)">查看质量状态</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script name="modelTableTree" setup>
const props = defineProps(['treeVo', 'isDialog']);
const loading = ref(false)
const tableList = ref([])
const isExpandAll = ref(true)
const tableHeight = computed(() => {
  return props.isDialog ? 'auto' : 'calc(100vh - 395px)';
});
const viewStatus = (status) => {}
</script>
<style lang="scss" scoped>
.table-tree__main {
  
}
::v-deep .table-tree__main .el-table .cell {
  white-space: pre;
}
</style>